<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateQaecmsTypesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qaecms_types', function (Blueprint $table) {
            $table->increments('id')->comment('类型ID');
            $table->integer('pid')->comment('类型父级ID')->default(0);
            $table->string('type')->comment('总分类')->default('video');
            $table->string('name')->comment('类型名称');
            $table->integer('sort')->comment('排序');
            $table->tinyInteger('default')->comment('默认分类,不可直接删除')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qaecms_types');
    }
}
